#ifndef _LIGHT_H_
#define _LIGHT_H_

#include "Vector.h"
#include <windows.h>
#include <gl\gl.h>

/**
Light represents one light in the scene
*/
class Light
{
public:
	Vector3 Position(void);
	void SetPosition(Vector3 position);
	
	Vector3 Ambient(void);
	void SetAmbient(Vector3 ambient);
	
	Vector3 Diffuse(void);
	void SetDiffuse(Vector3 diffuse);
	
	Vector3 Specular(void);
	void SetSpecular(Vector3 specular);

	int Index(void);
	void SetIndex(int index);

	/**
	updates lights position in OpenGL scene. Must be called every frame
	*/
	void Update(void);

	/**
	creates light in scene		
	*/
	static void Init(float x, float y, float z);
	static void Clear(void);
	static void LightsOn(void);
	static void LightOff(void);

	/**
	updates all lights
	*/
	static void UpdateAll(void);
	static Light* GetLight(int index);

private:
	Vector3 position;
	Vector3 ambient;
	Vector3 diffuse;
	Vector3 specular;
	int index;
		
	static Light *lights;	
	static int numberOfLights;	

private:

};

#endif